<?php 
session_start();
?>
<?php require_once('Conection_DataBase.php') ?>
<?
mysql_select_db($database_jssue, $jssue);
$idStuAsig = $_SESSION["codId"];
$Carnet = $_SESSION["cli1"];
		$Querry_recordSetAlum = "select cllg_pensum.CODE_RELEASE,cllg_career.NAME from cllg_pensum,cllg_courses_catalog,cllg_courses_pensum,cllg_career where cllg_pensum.FK_CAREER = '$Carnet' and cllg_pensum.CODE_RELEASE = cllg_courses_pensum.FK_PENSUM and cllg_courses_pensum.FK_COURSE = cllg_courses_catalog.CODE and  cllg_pensum.FK_CAREER = cllg_career.ID";
		$recordsetAlum = mysql_query($Querry_recordSetAlum, $jssue) or die(mysql_error());
		$rowRecordsetAlum=mysql_fetch_assoc($recordsetAlum);
		
		$Querry_recordSetCurso = "select * from cllg_courses_pensum,cllg_courses_catalog where cllg_courses_pensum.FK_PENSUM = '$idStuAsig' and cllg_courses_pensum.FK_COURSE = cllg_courses_catalog.CODE";
		$recordsetCurso = mysql_query($Querry_recordSetCurso, $jssue) or die(mysql_error());

$Fec = date('d-m-Y');
?>
<script>
function window.onbeforeprint(){
noprint.style.visibility = 'hidden';
noprint.style.position = 'absolute';
}
function window.onafterprint(){
noprint.style.visibility = 'visible';
noprint.style.position = 'relative';
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Rep de Pensum &amp; cursos</title>
<link href="css/print.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="wrap">

<div id="header">
  <h1><img src="logocinde.png" /></h1>
</div>

<div id="content">
<h2>Carreras &amp; Pensum &amp; Cursos </h2>
<table width="296">
  <tr>
    <td id="noprint"><input name="imprimir" type="button" onClick="window.print();" value="Imprimir" />
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="9%"><strong>Carrera:</strong></td>
    <td width="42%"><?PHP echo $rowRecordsetAlum['NAME'];?></td>
    <td width="11%"><strong>Pensum:</strong></td>
    <td width="38%"><?PHP echo $rowRecordsetAlum['CODE_RELEASE'];?></td>
    </tr>
  <tr>
    <td colspan="4"><table width="100%" border="0">
        <tr>
          <td width="19%"><strong>Codigo Curso:</strong></td>
          <td width="32%"><strong>Nombre Curso :</strong></td>
          </tr>
        <?PHP while ($rowRecordsetCurso=mysql_fetch_assoc($recordsetCurso)){?><tr>
          <td><?PHP echo $rowRecordsetCurso['CODE'];?></td>
          <td width="32%"><?PHP echo $rowRecordsetCurso['NAME'];?></td>
          </tr><?php }?>
      </table></td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
  </table>
<hr />
</div>
<div id="footer">CINDE  - Generado el <?PHP echo $Fec;?></div>
</div>
</body>
</html>